<!--
 * @Descripttion: 
 * @version: 
 * @Author: sueRimn
 * @Date: 2022-07-11 10:34:35
 * @LastEditors: sueRimn
 * @LastEditTime: 2022-07-15 16:35:20
-->
<template>
  <div>
    <h3>子组件</h3>
    <p>props:{{ pChild2 }}</p>
    <p>$attrs:{{ $attrs }}</p>
    <child2 v-bind="$attrs" v-on="$listeners"></child2>
  </div>
</template>

<script>
import child2 from "./child2.vue";
export default {
  components: { child2 },
  name: "child1",
  data() {
    return {};
  },
  props: ["pChild2"],
  inheritAttrs: false,
  mounted() {
    this.$emit("test2");
  },
};
</script>
